/**
 * Lenovo Group
 * Copyright (c) 1999-2016 All Rights Reserved.
 */
package com.lenovo.lmrp.api.appgateway;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;

import com.lenovo.lmrp.api.constant.APIConstant;
import com.lenovo.lmrp.api.model.RestResponse;
import com.lenovo.lmrp.api.model.view.ProjectVO;

/**
 * Provide interface for App to query Project list and show Project deatil information
 * 
 * @author wujin
 * @version v1.0
 */
public interface IAppProject {
    
    /**
     * Query project list filtered by user permission
     * 
     * @param itsmcode      distinct ITSM system
     * @return
     */
    @GET
    @Path("/{itsmcode}/projects")
    public RestResponse<List<ProjectVO>> listProject(@HeaderParam(APIConstant.HEADER_AUTHORIZATION) String token, 
                                                     @PathParam("itsmcode") String itsmCode,
                                                     @QueryParam("name") String name);
    
    /**
     * View special project by project ID
     * 
     * @param itsmcode  distinct ITSM system
     * @param projectid project ID
     * @return
     */
    @GET
    @Path("/{itsmcode}/projects/{projectid}")
    public RestResponse<ProjectVO> getProject(@HeaderParam(APIConstant.HEADER_AUTHORIZATION) String token,
                                              @PathParam("itsmcode") String itsmCode, 
                                              @PathParam("projectid") String projectid);
}
